build: generate bindings from the Frida devkit - #3
Merged
Conversation
The prebuilt wheel path installs the generated __init__.py, aio.py and _frida.pyi alongside the extension, not under build/frida/, so copy them from there. # Conflicts: # setup.py
Skip None values instead of passing them to typed setters. Map collection kwargs onto their select_/add_ methods, walking the parent chain. Affects specs, omits, externals, pids and identifiers.
The .gir rewrite emitted only GObject-derived classes and no annotations, so py.typed shipped an untyped facade. Reinstate the aliases as a prelude asset and annotate the facade from the existing pyi type mapping. Also fixes read-only options properties and the module functions missing from _frida.pyi.
The .gir yields only get_device_by_id/by_type, and drops Cancellable.connect/disconnect, whose callback is not marshallable. Reinstate all six. connect/disconnect go over the cancelled signal, keeping g_cancellable_connect's return-0-when-cancelled contract.
Facade on/off took any callable, so misshapen handlers type-checked. Derive the stacks from the .gir: the alias name follows from the type and signal name. Undefined aliases and single-signal types are skipped.
Reinstate the cancellable decorator, RPCResult, make_rpc_call_request and make_auth_callback, and expose ScriptExportsAsync from frida.core via a new facade_epilogues customization.
The GTlsCertificate-typed properties had no marshaller, so their setters were never generated. Marshal them to and from a string holding either a PEM blob or a filename, like the old hand-written bindings did. Reported and diagnosed by rev1si0n <ihaven0emmail@gmail.com>.
Vala's default argument is absent from the .gir, so the generated facade made the port mandatory. Declare the default in the customizations, and let param_typings override the facade signature also when there is no custom logic.
Its customization hardcoded an empty selector map instead of the one computed from the options type, so the plural kwarg was rejected. Let codegen build the options argument for custom facade methods that take **kwargs.
Sync methods dropped parameters of object type, so PeerOptions.add_relay never reached the extension even though the facade referred to it. Constructor kwargs were forwarded to an extension init that ignores them, leaving them silently unapplied. Apply them to the impl instead, reusing the options selectors so adders take a list, or a dict when they take a name and a value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.